<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
  
<h:head>
<title>Carrello</title>
</h:head>

<h:body>
<p:layout >
	<p:layoutUnit position="center" header="Storico Utente">
	
	
	<h1></h1>
	
	<p:growl id="msgs" showDetail="true" /> 
	
	<h:panelGroup>
	    <p:dataTable id="storico" var="p" value="#{visualizzaStoricoBean.storico}" paginator="true" rows="10"  
                 paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                 rowsPerPageTemplate="5,10,15"> 
	     
	        <p:column headerText="ID" style="width:4%">  
	            <h:outputText value="#{p.id}" />  
	        </p:column> 
	        
	        <p:column headerText="Luogo" style="width:20%">  
	            <h:outputText value="#{p.luogo}" />  
	        </p:column>  
	  
	        <p:column headerText="Luogo Partenza" style="width:20%">  
	            <h:outputText value="#{p.voloAndataPers.volo.luogoPartenza}" />  
	        </p:column> 
	        
	        <p:column headerText="Data Partenza" style="width:20%">  
	            <h:outputText value="#{p.voloAndataPers.volo.dataEOraFormattati}" />  
	        </p:column> 
	        
	        <p:column headerText="Data Ritorno" style="width:20%">  
	            <h:outputText value="#{p.voloRitornoPers.volo.dataEOraFormattati}" />  
	        </p:column> 
	        
	        <p:column headerText="Prezzo" style="width:20%">  
	            <h:outputText value="#{p.prezzo}" />  
	        </p:column> 
	        
	        <p:column style="width:4%">
				<h:form>
				<p:commandButton action="#{dettagliPacchettoPersonalizzatoBean.visualizzaPacchettoStorico(p)}" icon="ui-icon-search" ajax="false" onclick="form.target='_blank'" />
				</h:form>
			</p:column> 
			
	    </p:dataTable> 
    </h:panelGroup>
    <p:commandButton action="/home?faces-redirect=true" value="Indietro"/>
    </p:layoutUnit>
    </p:layout>
</h:body>
</html>